<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>添加电影</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/lib/css/bootstrap.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
    <div class="row">
        <ul class="nav nav-pills">
            <li class="active">
                <a href="#">首页</a>
            </li>
            <li><a href="#">电影</a></li>
            <li><a href="#">影院</a></li>
        </ul>
    </div>
    <div class="row">
        <div id="addMovie">
            <div class="form-horizontal" >
                <div class="control-group">
                    <div class="control-label">
                        <label for="name">电影名：</label>
                    </div>
                    <div class="controls">
                        <input id="name" type="text" class="input-xlarge" placeholder="电影名" v-model="movie.name">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="foreignName">外国片名：</label>
                    </div>
                    <div class="controls">
                        <input id="foreignName" type="text" class="input-xlarge" placeholder="外国片名"
                               v-model="movie.foreignName">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="director">导演：</label>
                    </div>
                    <div class="controls">
                        <input id="director" type="text" class="input-xlarge" placeholder="导演"
                               v-model="movie.director">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="score">评分：</label>
                    </div>
                    <div class="controls">
                        <input id="score" type="text" class="input-xlarge" placeholder="评分"
                               v-model="movie.score">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="actors">主演：</label>
                    </div>
                    <div class="controls">
                        <input id="actors" type="text" class="input-xlarge" placeholder="主演  ','分割"
                               v-model="movie.actors">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="type">类型：</label>
                    </div>
                    <div class="controls">
                        <input id="type" type="text" class="input-xlarge" placeholder="类型  ','分割"
                               v-model="movie.type">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="areas">地区：</label>
                    </div>
                    <div class="controls">
                        <input id="areas" type="text" class="input-xlarge" placeholder="地区  ','分割"
                               v-model="movie.areas">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="date">上映时间：</label>
                    </div>
                    <div class="controls">
                        <input id="date" type="text" class="input-xlarge" placeholder="上映时间"
                               v-model="movie.date">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="language">语言：</label>
                    </div>
                    <div class="controls">
                        <input id="language" type="text" class="input-xlarge" placeholder="语言"
                               v-model="movie.language">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="filmLength">片长：</label>
                    </div>
                    <div class="controls">
                        <input id="filmLength" type="text" class="input-xlarge" placeholder="片长"
                               v-model="movie.filmLength">
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        <label for="post">海报：</label>
                    </div>
                    <div class="controls">
                        <input id="post" type="file" name="post" @change="addPost" style="display: none">
                        <button v-if="!file" class="btn btn-info" @click="addFile">添加海报</button>
                        <img :src="file" v-if="file"/>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <button class="btn btn-primary" @click="addMovie">增加</button>
                        <button type="reset" class="btn">重置</button>
                    </div>
                </div>
            </div>
            <div v-if="message" class="alert" :class="classObject">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                <strong>{{message}}</strong>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/lib/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/lib/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/lib/js/vue.min.js"></script>
<script type="text/javascript" src="/static/lib/js/vue-resource.min.js"></script>
<script type="text/javascript" src="/static/js/movie/addMovie.js"></script>
</html>
